package com.shop.cereshop.business.service.business.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shop.cereshop.business.dao.business.CereBusinessAdviceTrackDAO;
import com.shop.cereshop.business.service.business.CereBusinessAdviceTrackService;
import com.shop.cereshop.commons.domain.business.CereBusinessAdviceTrack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商家经营建议完成情况服务实现类
 */
@Service
public class CereBusinessAdviceTrackServiceImpl implements CereBusinessAdviceTrackService {

    @Autowired
    private CereBusinessAdviceTrackDAO cereBusinessAdviceTrackDAO;

    @Override
    public void save(CereBusinessAdviceTrack track) {
        cereBusinessAdviceTrackDAO.insert(track);
    }

    @Override
    public void update(CereBusinessAdviceTrack track) {
        cereBusinessAdviceTrackDAO.updateById(track);
    }

    @Override
    public void delete(Long trackId) {
        cereBusinessAdviceTrackDAO.deleteById(trackId);
    }

    @Override
    public CereBusinessAdviceTrack getById(Long trackId) {
        return cereBusinessAdviceTrackDAO.selectById(trackId);
    }

    @Override
    public CereBusinessAdviceTrack getByAdviceIdAndShopId(Long adviceId, Long shopId) {
        return cereBusinessAdviceTrackDAO.selectByAdviceIdAndShopId(adviceId, shopId);
    }
}